package cn.com.utt.unms.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import cn.com.utt.unms.pojo.PhoneMac;

@Mapper
public interface PhoneMacMapper {

	@Select("select * from phone_mac where phone=#{phone} and mac=#{mac}")
	PhoneMac queryRecord(@Param("phone") String phone, @Param("mac") String mac);

	@Select("update phone_mac set login_count=#{loginCount} where phone=#{phone} and mac=#{mac}")
	void updateRecord(PhoneMac phoneMac);
	
	@Insert("insert into phone_mac(phone,mac,login_count) values(#{phone},#{mac},#{loginCount})")
	void saveRecord(PhoneMac phoneMac);

}